﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AdmLaboratorios.DAO;

namespace AdmLaboratorios.Business
{
    public static class Conexion
    {
        public static void Connect(string connString)
        {
            string err = string.Empty;
            DAOFactory.ProbarConexion(connString, ref err);
        }

        static public bool TestConnection(List<string> connectionStrings)
        {
            foreach (string c in connectionStrings)
            {
                string error = "";
                if (DAOFactory.ProbarConexion(@c, ref error))
                {
                    return true;
                }
            }
            return false;
        }
    }
}
